namespace Test
import Grawlix

final class A:
	
	public val = 0.0
	
	[Comparison(InvertOperators: true)]
	private def Comparison(rhs as Compare):
		return val - rhs.val

final class Compare:
	public val = 0.0

a = A()
b as Compare = Compare()
x as A = null
y as Compare = null

assert not a < b
assert not a < y
assert not a < null
assert     a <= b
assert not a <= y
assert not a <= null
assert not a > b
assert     a > y
assert     a > null
assert     a >= b
assert     a >= y
assert     a >= null

assert not b < a
assert not b < x
assert     b <= a
assert not b <= x
assert not b > a
assert     b > x
assert     b >= a
assert     b >= x

assert     x < b
assert not x < y
assert not x < null
assert     x <= b
assert     x <= y
assert     x <= null
assert not x > b
assert not x > y
assert not x > null
assert not x >= b
assert     x >= y
assert     x >= null

assert     y < a
assert not y < x
assert     y <= a
assert     y <= x
assert not y > a
assert not y > x
assert not y >= a
assert     y >= x

assert     null < a
assert not null < x
assert     null <= a
assert     null <= x
assert not null > a
assert not null > x
assert not null >= a
assert     null >= x
